import java.util.Arrays;
import java.util.Scanner;
public class Main {
            public static void main(String[] args) {
                Scanner scanner = new Scanner(System.in);

                int N = scanner.nextInt();
                int[] grades = new int[5 * N];

                for (int i = 0; i < 5 * N; i++) {
                    grades[i] = scanner.nextInt();
                }

                Arrays.sort(grades);

                int sum = 0;

                for (int i = N; i < 4 * N; i++) {
                    sum += grades[i];
                }

                double score = (double) sum / (3 * N);

                System.out.println(score);

                scanner.close();
            }
        }